package com.yc.service.impl;

import com.yc.entities.BloodSugarPermission;
import com.yc.entities.BloodSugarUser;
import com.yc.entities.custom.UserRoleBean;
import com.yc.mapper.BloodSugarUserMapper;
import com.yc.service.BloodSugarUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户主体账户信息表 服务实现类
 * </p>
 *
 * @author kuakha
 * @since 2021-04-07
 */
@Service
public class BloodSugarUserServiceImpl extends ServiceImpl<BloodSugarUserMapper, BloodSugarUser> implements BloodSugarUserService {



    @Override
    public UserRoleBean getUserRoleByUserId(Integer id) {
        return this.baseMapper.getUserRoleByUserId(id);
    }

    @Override
    public List<BloodSugarPermission> selectPermissionInfoByUserAccount(String account) {
        return this.baseMapper.selectPermissionInfoByUserAccount(account);
    }

    @Override
    public int insert(BloodSugarUser bloodSugarUser) {
        return this.baseMapper.saveUser(bloodSugarUser);
    }

    @Override
    public int saveDeanAccount(BloodSugarUser bloodSugarUser) {
        return this.baseMapper.saveUser(bloodSugarUser);
    }

}
